/*
     Copyright 2007 Joseph M. Ferner

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

namespace OpenServers.Net.FtpServer {
    /// <summary>
    /// enum of 211 reasons.
    /// </summary>
    public enum Reason211 {
        /// <summary>
        /// no extended features.
        /// </summary>
        NoFeatures,

        /// <summary>
        /// start of extended features.
        /// </summary>
        ExtensionsSupported,

        /// <summary>
        /// end of extended features.
        /// </summary>
        End
    }

    /// <summary>
    /// enum of 550 reasons.
    /// </summary>
    public enum Reason550 {
        /// <summary>
        /// File already exists.
        /// </summary>
        FileAlreadyExists,

        /// <summary>
        /// Access is denied.
        /// </summary>
        AccessDenied,

        /// <summary>
        /// file was not found.
        /// </summary>
        FileNotFound
    }

    /// <summary>
    /// enum of 257 reasons.
    /// </summary>
    public enum Reason257 {
        /// <summary>
        /// Directory created.
        /// </summary>
        DirectoryCreated,

        /// <summary>
        /// Current directory.
        /// </summary>
        CurrentDirectory
    }

    /// <summary>
    /// Interface for looking up response messages.
    /// </summary>
    public interface IMessages {
        /// <summary>
        /// File status okay; about to open data connection.
        /// </summary>
        /// <param name="arguments">Name of file</param>
        string Get150(string arguments);

        /// <summary>
        /// Command okay.
        /// </summary>
        string Get200();

        /// <summary>
        /// System status, or system help reply.
        /// </summary>
        string Get211(Reason211 features);

        /// <summary>
        /// NAME system type.
        /// Where NAME is an official system name from the list in the
        /// Assigned Numbers document.
        /// </summary>
        /// <param name="nameOfSystem">Name of system</param>
        string Get215(string nameOfSystem);

        /// <summary>
        /// Service ready for new user.
        /// </summary>
        string Get220();

        /// <summary>
        /// Service closing control connection.
        /// </summary>
        string Get221();

        /// <summary>
        /// Closing data connection.
        /// Requested file action successful (for example, file transfer or file abort).
        /// </summary>
        string Get226();

        /// <summary>
        /// User logged in, proceed.
        /// </summary>
        string Get230();

        /// <summary>
        /// Requested file action okay, completed.
        /// </summary>
        string Get250();

        /// <summary>
        /// "PATHNAME" created.
        /// </summary>
        string Get257(string directory, Reason257 reason);

        /// <summary>
        /// User name okay, need password.
        /// </summary>
        string Get331();

        /// <summary>
        /// Requested file action pending further information.
        /// </summary>
        string Get350();

        /// <summary>
        /// Syntax error, command unrecognized.
        /// </summary>
        string Get500();

        /// <summary>
        /// Syntax error in parameters or arguments.
        /// </summary>
        string Get501();

        /// <summary>
        /// Command not implemented.
        /// </summary>
        string Get502();

        /// <summary>
        /// Bad sequence of commands.
        /// </summary>
        string Get503();

        /// <summary>
        /// Not logged in.
        /// </summary>
        string Get530();

        /// <summary>
        /// Requested action not taken. File unavailable (e.g., file not found, no access).
        /// </summary>
        string Get550(Reason550 found);

        /// <summary>
        /// Requested action not taken. File name not allowed.
        /// </summary>
        string Get553();
    }
}
